package com.digitalchina.lxnsy.activity.farmTrain;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;
import com.digitalchina.lxnsy.toolkit.GotoUtil;

/**
 * ================================================
 * 项目名称：android
 * 类描述：选择报价
 * 创建人：rxx
 * 创建时间：2020/1/15 17:26
 * 修改备注：
 * ================================================
 */
public class TrainSelectAgencyActivity extends BaseHtmlActivity {

    private String json = "";
    @Override
    protected void loadHtml() {
        webView.addJavascriptObject(new JsApi(), null);
        loadUrl("train-select-agency");
        setTitle("已报价的机构");
        json = (String) getIntent().getSerializableExtra("msg");
    }

    @Override
    public void rightOnClick() {

    }

    public class JsApi {
        //去结果
        @JavascriptInterface
        public void goResult(Object msg) {
            activity.setResult(RESULT_OK);
            GotoUtil.gotoActivity(activity,TrainSelectFinshActivity.class, true);
        }
        //去详情
        @JavascriptInterface
        public void goDetails(Object msg) {
            go(TrainQuoteDetailsActivity.class);
        }

        //看报价
        @JavascriptInterface
        public void goViewQuote(Object msg) {
            go(TrainQuoteDetailsActivity.class);
        }

        //机构主页
        @JavascriptInterface
        public void goJiGou(Object msg) {
            go(TrainAgencyDetailActivity.class);
        }


    }
}
